#ifndef SEND_MESSAGE_COM_HPP
#define SEND_MESSAGE_COM_HPP
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QDebug>
#include "mavlink/common/mavlink.h"

class SendMessageCom : public QObject {
  Q_OBJECT
public:
  SendMessageCom(QObject *parent = nullptr, QSerialPort *serial = nullptr);
  ~SendMessageCom() = default;
  int sendMavlinkMessage(mavlink_message_t* msg);
public slots:
  int sendHeartbeat();
  void sendMessage(QString message);
private:
  QSerialPort *serial;
};

#endif